<?php
/* Description: This file is used to add sub sub category. */
#########IncludeFiles####################################################################################
include_once '../inc/config.php';
include_once("../inc/bootstrape.php");
require_once _SITE_PATH_.'classes/Vendor/Vendor.php';
require_once _SITE_PATH_.'classes/Master/Master.php';
require_once _SITE_PATH_.'classes/CommonUtility/CommonUtility.php';

$id = trim($_REQUEST['id']);

if( $_POST['submit']=='Submit'){   
	$parms['id'] = $_POST['id'];
	$parms['name'] = $_POST['name'];
	$parms['description'] = $_POST['description'];
	$parms['added'] = date("Y-m-d h:i:s");
	 
	$condition['id'] = $parms['id'];
	
    if( CommonUtility::updateData($parms, 'services_attributes', $condition)) {        
        header("Location: service_attribute_mng.php?msg=1516");            
        exit;
    }
    $err = 1517;    
}

$attributes = array();
$attributes = Master::getServicesAttributes($id);
$result = $attributes[0];

$errMsg = $err;
$_tplName = 'master/service_attribute_edit.tpl';
$_title = 'Edit Services Attributes';

require_once _ADMIN_TPL_MAIN_;
?>